/*
 *  txdnet.cn tonydon
 * 
 */
package cn.txdnet.txcms.domain;

import cn.txdnet.txweb.annotation.validation.Default;
import cn.txdnet.txweb.annotation.validation.NotEmpty;
import cn.txdnet.txweb.annotation.validation.Validator;

/**
 * 类目级别记录表
 *
 * @author txdnet
 */
public class CatalogsLevel extends BaseEntity {

    private static final long serialVersionUID = -3495236800745545657L;
    
    @NotEmpty
    private Integer cid;
    
    @Default(intVal=0)
    private Integer c1;
    
    @Default(intVal=0)
    private Integer c2;
    
    @Default(intVal=0)
    private Integer c3;
    
    @Default(intVal=0)
    private Integer c4;
    
    @Default(intVal=0)
    private Integer c5;

    @Override
    public boolean validate() {
        return Validator.validate(this);
    }

    /**
     * @return the cid
     */
    public Integer getCid() {
        return cid;
    }

    /**
     * @param cid the cid to set
     */
    public void setCid(Integer cid) {
        this.cid = cid;
    }

    /**
     * @return the c1
     */
    public Integer getC1() {
        return c1;
    }

    /**
     * @param c1 the c1 to set
     */
    public void setC1(Integer c1) {
        this.c1 = c1;
    }

    /**
     * @return the c2
     */
    public Integer getC2() {
        return c2;
    }

    /**
     * @param c2 the c2 to set
     */
    public void setC2(Integer c2) {
        this.c2 = c2;
    }

    /**
     * @return the c3
     */
    public Integer getC3() {
        return c3;
    }

    /**
     * @param c3 the c3 to set
     */
    public void setC3(Integer c3) {
        this.c3 = c3;
    }

    /**
     * @return the c4
     */
    public Integer getC4() {
        return c4;
    }

    /**
     * @param c4 the c4 to set
     */
    public void setC4(Integer c4) {
        this.c4 = c4;
    }

    /**
     * @return the c5
     */
    public Integer getC5() {
        return c5;
    }

    /**
     * @param c5 the c5 to set
     */
    public void setC5(Integer c5) {
        this.c5 = c5;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 97 * hash + (this.cid != null ? this.cid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final CatalogsLevel other = (CatalogsLevel) obj;
        if (this.cid != other.cid && (this.cid == null || !this.cid.equals(other.cid))) {
            return false;
        }
        return true;
    }
}
